package com.test40_JDBC.vo;

import java.io.Serializable;

/**
 * 雇员
 */
public class Emp implements Serializable {
    private Long empno;
    private String ename;
    private Double salary;
    private Dept dept;

    public Emp() {
    }

    public Emp(String ename, Double salary) {
        this(null, ename, salary);
    }

    public Emp(Long empno, String ename, Double salary) {
        this.empno = empno;
        this.ename = ename;
        this.salary = salary;
    }

    @Override
    public String toString() {
        return "【雇员】编号：" + this.empno + "、姓名：" + this.ename + "、工资：" + this.salary;
    }

    public Long getEmpno() {
        return empno;
    }

    public void setEmpno(Long empno) {
        this.empno = empno;
    }

    public String getEname() {
        return ename;
    }

    public void setEname(String ename) {
        this.ename = ename;
    }

    public Double getSalary() {
        return salary;
    }

    public void setSalary(Double salary) {
        this.salary = salary;
    }

    public Dept getDept() {
        return dept;
    }

    public void setDept(Dept dept) {
        this.dept = dept;
    }
}
